package com.fit.pages.wholesale;

import java.util.ArrayList;
import java.util.List;

import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SessionState;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.fit.annotations.AdminAccess;
import com.fit.annotations.UserAccess;
import com.fit.dao.wholesale.WholesaleDAO;
import com.fit.entities.Wholesale;
import com.fit.services.BasicAuthenticator;

@UserAccess
@AdminAccess
public class Details {

	@Property
	@Persist
	private Wholesale wholesale;

	@Inject
	private WholesaleDAO wholesaleDAO;
	

	@SessionState
	@Property
	private BasicAuthenticator basic;

	Object onActivate(String name) {
//		registrations = new ArrayList<Registration>();
		wholesale = wholesaleDAO.findByName(name);
//		List<LicencePlate> list = licencePlateDAO.findByVehicle(vehicle);
//		for (int i = 0; i < list.size(); i++) {
//			List<Registration> l = registrationDAO.findByLicencePlateNo(list
//					.get(i));
//			for (int j = 0; j < l.size(); j++) {
//				registrations.add(l.get(j));
//			}
//		}
		return null;

	}

}
